switchroot: Suppress compiler warning for asprintf
authorColin Walters <walters@verbum.org>
Tue, 2 Apr 2013 01:52:24 +0000 (21:52 -0400)
committerColin Walters <walters@verbum.org>
Tue, 2 Apr 2013 01:52:24 +0000 (21:52 -0400)
We're not going to run OOM here, if we do, we're totally screwed
anyways.

src/switchroot/ostree-switch-root.c

index 6e74373b3da7629faa76f78aaa300c49cf4d1a75..98c62342867beba345b979cec0bbc2e6754007e0 100644 (file)
@@ -247,8 +247,8 @@ main(int argc, char *argv[])
   if (ostree_target_path[len-1] == '/')
     ostree_target_path[len-1] = '\0';
   fprintf (stderr, "Resolved OSTree target to: %s\n", ostree_target_path);
-  asprintf (&deploy_path, "%s/ostree/deploy/%s/%s", root_mountpoint,
-           ostree_osname, ostree_target_path);
+  (void) asprintf (&deploy_path, "%s/ostree/deploy/%s/%s", root_mountpoint,
+                  ostree_osname, ostree_target_path);
   
   /* Make deploy_path a bind mount, so we can move it later */
   if (mount (deploy_path, deploy_path, NULL, MS_BIND, NULL) < 0)